src/sys.hx
src/r_model.h
src/r_local.h
src/r_aclip.hx
src/r_model.hx
src/vector.hx
src/r_main.hx
src/r_rast.hx
src/r_misc.hx
src/r_edge.hx
src/r_bsp.hx
src/r_scan.hx
src/input.hx
src/r_alias.hx
src/r_polyse.hx
src/r_image.hx
src/r_sky.hx
#__end__
/*
Copyright 2010 Iain Surgey.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/


/*
#define RESH 640
#define RESV 480
#define SCRBYTES 1228800
//recalc SCRBYTES if resolution changes!!!!
//*/

//*
#define RESH 800
#define RESV 600
#define SCRBYTES 1920000//*/

struct {
	float p[3];
} vec3;

#define DRAWOFS0	524288
#define DRAWOFS1	589824

byte lighttable[589824]; //light lookup table
int screen[RESH*RESV]; //allocate screen
int zbuffer[RESH*RESV]; // allocate z buffer
int zminmaxs[RESH]; // allocate z minmax
byte	adivtab[2048];

#__body__
package;

import flash.utils.ByteArray;
import flash.Memory;
import flash.utils.Endian;
import flash.display.BitmapData;
import flash.Vector;
import flash.display.Bitmap;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.events.Event;

class ImgName {
	public var name : String;
	public var ptr : Int;
	public function new() {}
}

class LoadImg {
	public var name : String;
	public var texinfo : Vector<Int>;
	public function new() { texinfo = new Vector<Int>(); }
}

class Hxquake {
#__def__

private var r_images : Vector<ImgName>;
private var bmd : BitmapData;
private var bmp : Bitmap;

public static function main() {
	var run = new Hxquake();
}

public function new() {
	#__init__
	__m__.endian = Endian.LITTLE_ENDIAN;
	render_main();
}
